Skip to content

fix: resolve GITHUB_OUTPUT invalid format when no source files changed - #125

Closed
vigri wants to merge 3 commits into
ScanTailor-Advanced:masterfrom
vigri:fix/lint-workflow-count-output-format
Closed

fix: resolve GITHUB_OUTPUT invalid format when no source files changed#125
vigri wants to merge 3 commits into
ScanTailor-Advanced:masterfrom
vigri:fix/lint-workflow-count-output-format

Conversation

@vigri

@vigri vigri commented Apr 16, 2026

Copy link
Copy Markdown
Member

Problem
When no source files changed, grep -c exits with code 1, triggering || echo 0. The trailing newline from echo breaks the $GITHUB_OUTPUT format:

Fix
Replace grep -c || echo 0 with an explicit empty-string check and use printf for clean key=value\n output.

@vigri
vigri requested a review from pablogventura April 16, 2026 22:34
@vigri

vigri commented Apr 16, 2026

Copy link
Copy Markdown
Member Author

The commit history got a bit messy — sorry about that. I've merged #124 into my fork. @pablogventura let me know if you'd prefer a clean PR instead.

@pablogventura

Copy link
Copy Markdown

You’re right about the history — thanks for flagging it.

If you can redo the branch with a clean history, that would be wonderful and much easier for everyone to review and bisect later.

Thank you again for taking care of it (and for the Node 24 / Actions work alongside this fix).

Kind regards

@vigri

vigri commented Apr 17, 2026

Copy link
Copy Markdown
Member Author

If you can redo the branch with a clean history

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants